from django.contrib import admin

from sync_web.models import BucketSyncBaseInfo, AsyncTask, SyncErrorLog


# Register your models here.


@admin.register(BucketSyncBaseInfo)
class BucketSyncBaseInfoAdmin(admin.ModelAdmin):
    list_display = ('id', 'bash_url', 'bucket_name', 'local_dir', 'remote_path', 'bucket_token', 'sync_status',
                    'thread_num', 'create_time', 'collection_name', 'inotify_name', 'sync_status_enable', 'inotify_status_enable')


@admin.register(AsyncTask)
class AsyncTaskAdmin(admin.ModelAdmin):
    list_display = ('id', 'name')


@admin.register(SyncErrorLog)
class SyncErrorLogAdmin(admin.ModelAdmin):
    list_display = ('id', 'bucket', 'create_time', 'err_msg')
